Skip to main content

Loss functions

Loss functions guide your optimizer to take a step in the correct direction (direction of the global minima). For different tasks, different loss functions are used.

A complete list of all the available loss functions is available on the fastai docs here.

The default loss function is CrossEntropy, depending on your problem you would need to change the loss function.

Here is a small list of tasks which require different loss functions,

  1. Classification
  2. Object Detection
  3. Segmentation
  4. Problems involving class-imbalance
  5. Custom loss function (in case of hackathons, etc.)